// 生成uuid
function UUID() {
    let date = (new Date()).valueOf();//获取时间戳
    let txt = '1234567890';//生成的随机机器码
    let len = 6;//机器码有多少位
    let pwd = '';//定义空变量用来接收机器码
    for (let i = 0; i < len; i++) {
        pwd += txt.charAt(Math.floor(Math.random() * txt.length));//循环机器码位数随机填充
    }

    //相加生成唯一ID:date + pwd
    // console.log(date);
    return date + pwd;
}
let uuid = {
    getUUID() {
        return UUID()
    }
}

module.exports = uuid
